import * as request from '@/utils/request/request'
const perfix= ''
const api = {
    login(params){ // 登录授权
        return request.post(`${perfix}/auth/login`,params)
    },
    updatePass(params){ // 修改密码
        return request.post(`${perfix}/api/users/updatePassword`,params)
    },
    phoneLogin(params){ // 手机登录
        return request.get(`${perfix}/auth/phoneLogin`,params)
    },
    getPhoneValidCode(params){ // 获取手机登录验证码
        return request.get(`${perfix}/auth/getPhoneValidCode?phonenum=${params.phonenum}`)
    },
    captchalmage(params){ // 获取验证码
        return request.get(`${perfix}/captcha/captchaImage?type=math`,params, {responseType: 'blob'})
    },
    getCode(params){ // 获取验证码
        return request.get(`${perfix}/auth/code`,params)
    },
    getTable: (url,params) => request.post(url, params),
    // post
    post: (url, params) => request.post(url, params),
    // get
    get: (url, params) => request.get(url, params),
}
export default api
